import React from 'react';
import WrapNavigator from './Navigator'
import English from './English'
import DocumentTitle from 'react-document-title'

import {
  BrowserRouter as Router,
  // HashRouter as Router,
  Switch,
  Route,
} from "react-router-dom";

function RouterIndex () {
  const baseName = process.env.NODE_ENV === "development" ? "/" : "/navigator"
  return (
    <Router basename={baseName}>
      <Switch>
        <Route path="/" exact>
          <DocumentTitle title='Navigator - 导航'>
            <WrapNavigator></WrapNavigator>
          </DocumentTitle>
        </Route>
        <Route path="/English">
          <DocumentTitle title='English'>
            <English></English>
          </DocumentTitle>
        </Route>
      </Switch>
    </Router>
  )
}

export default RouterIndex